Be more careful when parsing gtk-decoration-layout
authorMatthias Clasen <mclasen@redhat.com>
Mon, 6 Jan 2014 22:05:53 +0000 (17:05 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 6 Jan 2014 22:07:21 +0000 (17:07 -0500)
When the string is empty, breaking it at : will not give
us two tokens, and we were parsing garbage, leading to crash.
https://bugzilla.gnome.org/show_bug.cgi?id=721635

gtk/gtkheaderbar.c

index f466cafb70f22bed9b5188fc7e521c1b3084e5e4..bbe6faad4cdfbcaa3b2c6085c9dfd76c7221e1c7 100644 (file)
@@ -359,7 +359,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
           int n_children = 0;
 
           if (tokens[i] == NULL)
-            continue;
+            break;
 
           t = g_strsplit (tokens[i], ",", -1);